:root {
    --parchment: #f4e9d8;
    --parchment-dark: #d4c4a8;
    --ink: #2c2416;
    --gold: #c9a961;
    --gold-dark: #9d7d3a;
    --burgundy: #6b2737;
    --dragon-red: #dc2626;
    --dragon-dark: #991b1b;
    --fire-orange: #f97316;
    --flame-gold: #fbbf24;
    --scale-bronze: #92400e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    background-color: var(--parchment);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.7;
}

/* Texture de parchemin */
.parchment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(44, 36, 22, 0.015) 2px,
            rgba(44, 36, 22, 0.015) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Bouton retour */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--dragon-red);
    color: var(--dragon-dark);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.back-button:hover {
    background: var(--dragon-red);
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

/* Section Hero */
.hero-section {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 100px 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background: linear-gradient(to bottom, 
        rgba(249, 115, 22, 0.1) 0%, 
        transparent 100%);
}

.hero-image {
    flex: 0 0 400px;
    animation: fadeInLeft 1s ease-out;
    padding: 10px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(249, 115, 22, 0.1));
    border-radius: 16px;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 
        0 10px 40px rgba(220, 38, 38, 0.4),
        0 0 0 4px var(--dragon-red),
        0 0 0 8px rgba(220, 38, 38, 0.3);
    border: 4px solid white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.02);
    box-shadow: 
        0 15px 50px rgba(220, 38, 38, 0.5),
        0 0 0 4px var(--fire-orange),
        0 0 0 8px rgba(220, 38, 38, 0.4);
}

.hero-content {
    flex: 1;
    animation: fadeInRight 1s ease-out;
}

.race-title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--dragon-dark);
    margin-bottom: 10px;
    letter-spacing: 3px;
    text-shadow: 2px 2px 0px rgba(249, 115, 22, 0.3);
}

.race-subtitle {
    font-size: 1.6rem;
    font-style: italic;
    color: var(--fire-orange);
    margin-bottom: 20px;
    font-family: 'Crimson Text', serif;
}

.race-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    font-size: 1.1rem;
    color: var(--scale-bronze);
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(220, 38, 38, 0.1);
    border-left: 4px solid var(--dragon-red);
    border-radius: 4px;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px 80px;
    position: relative;
    z-index: 2;
}

/* Sections */
.section {
    margin-bottom: 60px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dragon-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--dragon-red);
    letter-spacing: 2px;
}

/* Boîte de contenu */
.content-box {
    background: rgba(255, 255, 255, 0.5);
    padding: 30px;
    border-left: 4px solid var(--dragon-red);
    border-radius: 8px;
}

.content-box p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.content-box p:last-child {
    margin-bottom: 0;
}

.highlight-box {
    background: rgba(220, 38, 38, 0.1);
    padding: 20px;
    border-radius: 6px;
    border: 2px solid var(--dragon-red);
    margin: 20px 0;
}

.highlight-box p {
    margin: 0;
}

/* Présence */
.presence-box {
    background: rgba(249, 115, 22, 0.1);
    padding: 25px;
    border-left: 5px solid var(--fire-orange);
    border-radius: 8px;
    font-size: 1.1rem;
}

.presence-box strong {
    color: var(--dragon-red);
}

/* Grille de statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.stat-category {
    background: rgba(255, 255, 255, 0.6);
    padding: 25px;
    border-radius: 8px;
    border: 2px solid var(--fire-orange);
}

.stat-category h3 {
    font-family: 'Cinzel', serif;
    color: var(--dragon-dark);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.bonus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #ddd;
}

.stat-item.positive {
    color: #2d7a2d;
    border-color: #5a8f5a;
    background: rgba(90, 143, 90, 0.1);
}

.stat-item.negative {
    color: #a84a2b;
    border-color: #c9664b;
    background: rgba(168, 74, 43, 0.1);
}

.stat-item.neutral {
    color: #616161;
    border-color: #9e9e9e;
    background: rgba(158, 158, 158, 0.1);
}

.stat-item.highlight {
    border: 2px solid var(--dragon-red);
    background: rgba(220, 38, 38, 0.15);
    font-size: 1.1rem;
    color: var(--dragon-dark);
}

.stat-item.special {
    border: 2px solid var(--flame-gold);
    background: rgba(251, 191, 36, 0.15);
    font-size: 1.1rem;
    color: var(--scale-bronze);
    grid-column: 1 / -1;
}

/* Affinités */
.affinity-box {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(249, 115, 22, 0.1));
    padding: 30px;
    border: 3px solid var(--dragon-red);
    border-radius: 10px;
}

.affinity-highlight {
    font-size: 1.3rem;
    color: var(--dragon-dark);
    font-weight: 700;
    margin-bottom: 15px;
    font-family: 'Cinzel', serif;
}

.affinity-box p {
    font-size: 1.1rem;
}

/* Langues */
.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.language-card {
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-left: 4px solid var(--fire-orange);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.language-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
}

.language-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--dragon-dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.language-card p {
    font-size: 1.05rem;
}

/* Liste de talents */
.talents-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.talent-card {
    background: rgba(255, 255, 255, 0.6);
    padding: 25px;
    border-left: 5px solid var(--dragon-red);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.talent-card:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.15);
    transform: translateX(5px);
}

.talent-card.warning {
    border-left-color: var(--scale-bronze);
    background: rgba(146, 64, 14, 0.05);
}

.talent-card.warning:hover {
    box-shadow: 0 5px 20px rgba(146, 64, 14, 0.15);
}

.talent-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--dragon-dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.talent-card.warning h3 {
    color: var(--scale-bronze);
}

.talent-card p {
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Particularités sociales */
.social-box {
    background: rgba(255, 255, 255, 0.5);
    padding: 30px;
    border-left: 4px solid var(--dragon-red);
    border-radius: 8px;
}

.social-box p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.social-highlight {
    background: rgba(220, 38, 38, 0.1);
    padding: 20px;
    border-radius: 6px;
    border: 2px solid var(--fire-orange);
    margin-top: 20px;
}

.social-highlight p {
    margin-bottom: 10px;
}

.social-highlight p:last-child {
    margin-bottom: 0;
}

/* Graphique */
.chart-container {
    grid-column: 1 / -1;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    border: 2px solid var(--dragon-red);
}

.chart-wrapper canvas {
    max-height: 400px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px 30px;
    position: relative;
    z-index: 2;
}

.divider {
    width: 200px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--dragon-red), transparent);
    margin: 0 auto 20px;
}

.footer p {
    font-size: 0.95rem;
    color: var(--gold-dark);
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 80px 30px 40px;
    }

    .hero-image {
        flex: 0 0 auto;
        max-width: 350px;
    }

    .race-info {
        justify-content: center;
    }

    .stats-grid,
    .language-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .back-button {
        top: 10px;
        left: 10px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .hero-section {
        padding: 70px 20px 30px;
    }

    .hero-image {
        max-width: 280px;
    }

    .race-title {
        font-size: 2.2rem;
    }

    .race-subtitle {
        font-size: 1.2rem;
    }

    .race-info {
        flex-direction: column;
        gap: 10px;
    }

    .container {
        padding: 30px 20px 60px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .content-box,
    .stat-category,
    .talent-card {
        padding: 20px;
    }

    .bonus-grid {
        grid-template-columns: 1fr;
    }
}